package fr.afcepf.atod19.voyage.facade;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import fr.afcepf.atod19.voyage.entities.Client;
import fr.afcepf.atod19.voyage.entities.Reservation;
import fr.afcepf.atod19.voyage.entities.Voyage;
import fr.afcepf.atod19.voyage.service.interfaces.IServiceReservation;

@Component
@Transactional
public class FacadeAdminGestionReservation{

		@Autowired
		private IServiceReservation serviceReservation;

		public IServiceReservation getServiceReservation() {
			return serviceReservation;
		}

		public void setServiceReservation(IServiceReservation serviceReservation) {
			this.serviceReservation = serviceReservation;
		}
		
		public Reservation consulterUneReservation(int numReservation){
			return serviceReservation.consulterUneReservation(numReservation);
		}
		
		public Reservation faireUneReservation(Voyage v, Client c) {
			return serviceReservation.faireUneReservation(v, c);
		}
}
